package com.nbsaas.boot.store.rest.convert;

import com.nbsaas.boot.store.data.entity.StoreCheckIn;
import com.nbsaas.boot.store.api.domain.simple.StoreCheckInSimple;

import com.nbsaas.boot.rest.api.Converter;

/**
* 列表对象转换器
*/

public class StoreCheckInSimpleConvert implements Converter<StoreCheckInSimple, StoreCheckIn> {




@Override
public StoreCheckInSimple convert(StoreCheckIn source) {
    StoreCheckInSimple result = new StoreCheckInSimple();

                result.setAmount(source.getAmount());
                if(source.getStore()!=null){
                    result.setStoreName(source.getStore().getName());
                }
                if(source.getStore()!=null){
                    result.setStore(source.getStore().getId());
                }
                result.setId(source.getId());
                result.setBackMoney(source.getBackMoney());
                result.setDay(source.getDay());
                result.setAddDate(source.getAddDate());
                result.setLastDate(source.getLastDate());


    return result;
}

}